/* eslint-disable global-require */
const path = require("path")
const merge = require("webpack-merge")
const baseProd = require("../base/prod")

module.exports = function(env) {
  console.log(env)
  let prodConfig = {
    entry: {
      "mobile-browser-front": "./web/index.web.tsx"
    },
    output: {
      path: path.join(__dirname, "../../dist/app/index"),
      filename: "[name].js",
      library: "[name]",
      libraryTarget: "umd",
      chunkFilename: "[name].js",
      publicPath: "../../../.././app/"
    }
  }
  prodConfig = merge(baseProd(env), prodConfig)
  return prodConfig
}
